package com.kykj.kykj.service.impl;

import com.kykj.kykj.dao.ArticlesLikeDao;
import com.kykj.kykj.entity.ArticlesLikeEntity;
import com.kykj.kykj.service.ArticlesLikeService;
import com.kykj.kykj.vo.ArticlesLikeVo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticlesLikeServiceImpl implements ArticlesLikeService {
    @Resource
    ArticlesLikeDao articlesLikeDao;


    @Override
    public List<ArticlesLikeEntity> getArticlesLikeList() {
        return articlesLikeDao.getArticlesLikeList();
    }

    @Override
    public int addArticlesLike(ArticlesLikeVo articlesLikeVo) {
        return articlesLikeDao.addArticlesLike(articlesLikeVo);
    }

    @Override
    public int delArticlesLike(int id) {
        return articlesLikeDao.delArticlesLike(id);
    }

    @Override
    public int upArticlesLike(ArticlesLikeVo articlesLikeVo) {
        return articlesLikeDao.upArticlesLike(articlesLikeVo);
    }

    @Override
    public int getLikeCount() {
        return articlesLikeDao.getLikeCount();
    }

    @Override
    public List<ArticlesLikeEntity> getArticlesLikeListByUserId(int userId) {
        return articlesLikeDao.getArticlesLikeListByUserId(userId);
    }
}
